<div class="holder">
    <div class="sub-title red">
        <p><?php echo $this->session->userdata('ms')?$this->session->userdata('ms'):''; $this->session->unset_userdata('ms');?></p>
    </div>

    <div class="action"><?php echo anchor('minislideshow/minislideshow/add', 'New', 'class="button add"'); ?></div>
    <div style="clear:both"></div>
</div>
<div class="holder">
    <table cellspacing="0" class="admin-table"> 
        <thead> 
            <tr> 
                <th>No</th> 
                <th>Image</th>
                <th width="100">Action</th> 
            </tr> 
        </thead> 
        <tbody> 
            <?php
			if($data->num_rows() > 0){
				$PageNumber = $this->uri->segment(4);
				$PageNumber = (isset($PageNumber) && $PageNumber > 0) ? $PageNumber : 0;
				$i = $PageNumber;
				foreach ($data->result_array() as $v) {
					$i++;
					?>
					<tr> 
						<td width="25"><?php echo $i;?></td> 
						<td><img src="<?php echo MINI_SLIDESHOW_PATH . 'thumbs/' . $v[field('image')];?>" alt="<?php echo $v[field('image')];?>" height="40" /></td>
						<td align="center">
							<?php echo anchor('minislideshow/delete/'.$v[field('id')],'Delete','onclick="return confirm(\'Are sure to delete this image?\');"'); ?>
						</td>
					</tr> 
					<?php
				}
			}else{
            ?>
            <tr>
            	<td colspan="3">No data display!</td>
            </tr>
            <?php } ?>
        </tbody> 
    </table>
    <div class="pagination"><?php echo $this->pagination->create_links(); ?></div>
</div>